﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PersonaLibrary.View.NotesView
{
	/// <summary>
	/// Interaction logic for NewNote.xaml
	/// </summary>
	public partial class NewNote : Window
	{
		public NewNote()
		{
			InitializeComponent();
		}

		public string NoteName { set; get; }

		private void ok_Click(object sender, RoutedEventArgs e)
		{
			if (string.IsNullOrEmpty(noteName.Text))
				MessageBox.Show("Не возможно сохранить, так как поле \"Название\" пустое");
			else
			{
				NoteName = noteName.Text;
				DialogResult = true;
				Close();
			}
		}
	}
}
